From: Michael Albinus Date: Thu, 4 Jan 2018 11:58:42 +0000 (+0100) Subject: Improve backward compatibility in tramp-archive X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~19^2~6323 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=1cc7bc0f63ab118fda55aa40fa4b571a7c94393e;p=emacs.git Improve backward compatibility in tramp-archive * lisp/net/tramp-archive.el (tramp-archive-handle-temporary-file-directory): Use `tramp-compat-temporary-file-directory'. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test37-make-nearby-temp-file): Wrap `temporary-file-directory' call with `with-no-warnings'. --- diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el index 6c96075a001..45e3bf0a606 100644 --- a/lisp/net/tramp-archive.el +++ b/lisp/net/tramp-archive.el @@ -531,12 +531,12 @@ offered." (tramp-archive-gvfs-file-name file) noerror nomessage nosuffix must-suffix)) (defun tramp-archive-handle-temporary-file-directory () - "Like `temporary-file-directory' for Tramp files." + "Like `temporary-file-directory' for file archives." ;; If the default directory, the file archive, is located on a ;; mounted directory, it is returned as it. Not what we want. (with-parsed-tramp-archive-file-name default-directory nil (let ((default-directory (file-name-directory archive))) - (temporary-file-directory)))) + (tramp-compat-temporary-file-directory)))) (defun tramp-archive-handle-not-implemented (operation &rest args) "Generic handler for operations not implemented for file archives." diff --git a/test/lisp/net/tramp-archive-tests.el b/test/lisp/net/tramp-archive-tests.el index 85be2dc6230..149ed370432 100644 --- a/test/lisp/net/tramp-archive-tests.el +++ b/test/lisp/net/tramp-archive-tests.el @@ -699,7 +699,8 @@ This tests also `file-executable-p', `file-writable-p' and `set-file-modes'." tmp-file) ;; The file archive shall know a temporary file directory. It is ;; not in the archive itself. - (should (stringp (with-no-warnings (temporary-file-directory)))) + (should + (stringp (with-no-warnings (with-no-warnings (temporary-file-directory))))) (should-not (tramp-archive-file-name-p (with-no-warnings (temporary-file-directory))))